package com.ujs.eduservice.controller.admin;

import com.ujs.commonutils.constant.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhangshihao
 * @create 2023-08-03 20:36
 */
@RestController
@RequestMapping("/eduservice/user")
@Api(tags = "后台登录api")
public class EduLoginController {
    @PostMapping("/login")
    @ApiOperation("登录")
    public R login() {
        return R.ok().data("token", "admin");
    }

    @GetMapping("/info")
    @ApiOperation("获取用户信息")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin")
                .data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
